<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ch2BaseFile - Template For Chapter 2 Examples</title>
<script src="modernizr.js"></script>
<script src="Debugger.js"></script>
</head>
<body>
	<div style="position: absolute; left: 50px; top: 50px;">
		<canvas id="canvas" width="500" height ="500">
			Your browser does not support canvas!
		</canvas>
	</div>
<script>
	
	function eventWindowLoaded() {
		canvasApp();
	}
	
	window.addEventListener("load", eventWindowLoaded, false);
	
	function canvasSupport() {
		return Modernizr.canvas;
	}

    var ctx;

	function canvasApp() {
		if (!canvasSupport()) {
			return;
		} else {
			var canvas = document.getElementById("canvas");
			ctx = canvas.getContext("2d");
		}
		drawScreen();
	}
	
	function drawScreen() {
		ctx.fillStyle = "black";
		ctx.strokeStyle = "black";

        ctx.beginPath();
        ctx.lineWidth = 2;
        ctx.moveTo(0, 0);
        ctx.quadraticCurveTo(100, 25, 0, 50);
        ctx.moveTo(0, 0);
        ctx.quadraticCurveTo(100, 35, 0, 50);
        ctx.moveTo(150, 0);
        ctx.bezierCurveTo(0, 125, 300, 175, 150, 300);
        ctx.stroke();
        ctx.closePath();

    }
	
	
</script>
</body>
</html>